package com.alks.function.data.dto.chengKong.produce;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Getter
@Setter
@NoArgsConstructor
@ToString
public class PcLotDetailDto {

    @ApiModelProperty(value = "指令",name = "lotNo")
    private String lotNo;

    @ApiModelProperty(value = "型体",name = "styleNo")
    private String styleNo;

    @ApiModelProperty(value = "序号",name = "seqNo")
    private String seqNo;

    @ApiModelProperty(value = "鞋码",name = "sizeNo")
    private String sizeNo;

    @ApiModelProperty(value = "冲刀",name = "cutSize")
    private String cutSize;

    @ApiModelProperty(value = "楦头",name = "lastSize")
    private String lastSize;

    @ApiModelProperty(value = "大底",name = "soleSize")
    private String soleSize;

    @ApiModelProperty(value = "中底",name = "insoleSize")
    private String insoleSize;

    @ApiModelProperty("订单数")
    private BigDecimal orderQty;

    @ApiModelProperty("预补数")
    private BigDecimal surplusQty;

    //订单数+预补数
    private BigDecimal count;

    //订单数+预补数
    private BigDecimal ordQty;

    private BigDecimal surplusQtyCount;

    private BigDecimal orderQtyCount;

    public BigDecimal getTotalQty() {
        BigDecimal totalQty = BigDecimal.ZERO;
        if (orderQty != null){
            totalQty = totalQty.add(orderQty);
        }else {
            totalQty=totalQty.add(BigDecimal.ZERO);
        }
        if (surplusQty != null){
            totalQty = totalQty.add(surplusQty);
        }else {
            totalQty=totalQty.add(BigDecimal.ZERO);
        }
        return totalQty;
    }

    public BigDecimal getOrderQtyCount() {
        BigDecimal totalQty = BigDecimal.ZERO;
        if (orderQty != null){
            totalQty = totalQty.add(orderQty);
        }else {
            totalQty=totalQty.add(BigDecimal.ZERO);
        }
        return totalQty;
    }

    public BigDecimal getSurplusQtyCount() {
        BigDecimal totalQty = BigDecimal.ZERO;
        if (surplusQty != null){
            totalQty = totalQty.add(surplusQty);
        }else {
            totalQty=totalQty.add(BigDecimal.ZERO);
        }
        return totalQty;
    }

}
